﻿<%@ page language="java" import="java.util.*,net.skyedu.bean.*,net.skyedu.dao.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
request.setCharacterEncoding("UTF-8");
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
   <base href="<%=basePath %>">
    <title>处理页面</title>
    <link href="<%=basePath %>attend/frame/images/skin.css" rel="stylesheet" type="text/css" />
	<link href="<%=basePath %>attend/css/tab.css" rel="stylesheet" type="text/css" />
	<script language="javascript" type="text/javascript" src="<%=basePath %>attend/js/tab.js"></script>
	<script language="javascript">
		function  checkForm(){
			var late=document.upr.late.value;
			var early=document.upr.early.value;
			if(late.length==0){
				alert("不能为空，如未迟到请填0！");
				return false;
			}else if(early.length==0){
				alert("不能为空，如未早退请填0！");
				return false;
			}
				return true;
		}
	</script>
</head> 
  
  <body>
  <%
  	 int attId=Integer.parseInt(request.getParameter("attID"));
	 int st=Integer.parseInt(request.getParameter("sta"));
     String currentPage=request.getParameter("currentPage");
     String startTime=request.getParameter("startTime");
     String endTime=request.getParameter("endTime");
     String name=request.getParameter("na");
     UserInfoDao ud=new UserInfoDao();
     Attendance att=ud.searchAttById(attId);
  %>
   		<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="17" valign="top" background="<%=basePath %>attend/frame/images/mail_leftbg.gif"><img src="<%=basePath %>attend/frame/images/left-top-right.gif" width="17" height="29" /></td>
    <td valign="top" background="<%=basePath %>attend/frame/images/content-bg.gif"><table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
      <tr>
        <td height="31"><div class="titlebt">考勤处理</div></td>
      </tr>
    </table></td>
    <td width="16" valign="top" background="<%=basePath %>attend/frame/images/mail_rightbg.gif"><img src="<%=basePath %>attend/frame/images/nav-right-bg.gif" width="16" height="29" /></td>
  </tr>
  <tr>
    <td valign="middle" background="<%=basePath %>attend/frame/images/mail_leftbg.gif">&nbsp;</td>
    <td valign="top" bgcolor="#F7F8F9">
    <!--    内嵌代码 Start-->
    <form action="UpRequest" name="upr" method="post" onSubmit="return checkForm()">
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<input name="attID" type="hidden" value="<%=attId %>">
    <input name="currentPage" type="hidden" value="<%=currentPage %>">
    <input name="startTime" type="hidden" value="<%=startTime %>">
    <input name="endTime" type="hidden" value="<%=endTime %>">
    <input name="sta" type="hidden" value="<%=st %>">
	<input name="usname" type="hidden" value="<%=name %>">
	  <tr>
	    <td><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
	  <tr>
	    <td height="30"><table width="100%" border="0" cellspacing="0" cellpadding="0">
	      <tr>
	        <td width="15" height="30"><img src="<%=basePath %>attend/images/tab_03.gif" width="15" height="30" /></td>
	        <td background="<%=basePath %>attend/images/tab_05.gif" height="30" class="STYLE1"><font color="#FF0000">注:请各位管理员务必在每周二下午3点之前处理完所在校区上一周的员工考勤，否则系统将自动确认。系统只能读取前一天的考勤记录，建议大家及时处理以方便他人确认考勤。</font></td>
	        </tr>
	    </table></td>
	        <td width="14"><img src="<%=basePath %>attend/images/tab_07.gif" width="14" height="30" /></td>
	  </tr>
	    </table></td>
	  </tr>
	  <tr>
	    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
	      <tr>
	        <td width="9" background="<%=basePath %>attend/images/tab_12.gif">&nbsp;</td>
	        <td bgcolor="#f3ffe3">
<!--内嵌Table Start-->
	      <table width="80%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#c0de98">
		  <tr>
		    <th height="26" colspan="6" background="<%=basePath %>attend/images/tab_14.gif" class="STYLE1"><div align="center" class="STYLE2"><%=att.getName() %>的考勤信息</div></th>
		    </tr>
		  <tr>	
		    <td width="10%" height="25" align="right" bgcolor="#FFFFFF" class="STYLE2 STYLE1">姓&nbsp;&nbsp;名：</td>
		    <td width="21%" align="center" bgcolor="#FFFFFF" class="STYLE2 STYLE1"><%=att.getName() %></td>
		    <td width="13%" align="right" bgcolor="#FFFFFF" class="STYLE2 STYLE1">校&nbsp;&nbsp;区：</td>
		    <td width="21%" align="center" bgcolor="#FFFFFF" class="STYLE2 STYLE1"><%=att.getDeptname() %></td>
		    <td width="11%" align="right" bgcolor="#FFFFFF" class="STYLE2 STYLE1">确认状态：</td>
		    <td width="24%" align="center" bgcolor="#FFFFFF" class="STYLE2 STYLE1"><%if(att.getAttconfirm()==0){%>待处理
		    <%} if(att.getAttconfirm()==1){ %>已确认
		    <%} if(att.getAttconfirm()==4){ %>已驳回
		    <%} if(att.getAttconfirm()==5){ %>待确认<%} %></td>
		  </tr>
		  <tr>
		    <td height="25" bgcolor="#FFFFFF" align="right" class="STYLE2 STYLE1">日&nbsp;&nbsp;期：</td>
		    <td bgcolor="#FFFFFF" align="center" class="STYLE2 STYLE1"><%=att.getAttdate() %></td>
		    <td bgcolor="#FFFFFF" align="right" class="STYLE2 STYLE1">上班时间：</td>
		    <td bgcolor="#FFFFFF" align="center" class="STYLE2 STYLE1"><%if(att.getAttworktime()==null){%>未打卡<%}else{%><%=att.getAttworktime() %><%} %></td>
		    <td bgcolor="#FFFFFF" align="right" class="STYLE2 STYLE1">下班时间：</td>
		    <td bgcolor="#FFFFFF" align="center" class="STYLE2 STYLE1"><%if(att.getAttclosingtime()==null){%>未打卡<%}else{%><%=att.getAttclosingtime() %><%} %></td>
		  </tr>
		  <tr>
		    <th height="26" colspan="6" background="<%=basePath %>attend/images/tab_14.gif" class="STYLE1"><div align="center" class="STYLE2">考勤处理</div></th>
		    </tr>
		    <tr>
		    <td height="25" bgcolor="#FFFFFF" align="right" class="STYLE2 STYLE1">状&nbsp;&nbsp;态：</td>
		    <td bgcolor="#FFFFFF" class="STYLE2 STYLE1"><select name="state" style= "width:80px" >  
					<option value="1" <%if(att.getAttstate()==1){%>selected<%} %>> 正 常 </option>
					<option value="2" <%if(att.getAttstate()==2){%>selected<%} %>> 迟 到 </option>
					<option value="3" <%if(att.getAttstate()==3){%>selected<%} %>> 早 退 </option>
					<option value="4" <%if(att.getAttstate()==4){%>selected<%} %>> 调 休 </option>
					<option value="5" <%if(att.getAttstate()==5){%>selected<%} %>> 旷 工 </option>
					<option value="6" <%if(att.getAttstate()==6){%>selected<%} %>> 出 差 </option>
					<option value="7" <%if(att.getAttstate()==7){%>selected<%} %>> 婚 假 </option>
					<option value="8" <%if(att.getAttstate()==8){%>selected<%} %>> 年 假 </option>
					<option value="9" <%if(att.getAttstate()==9){%>selected<%} %>> 病 假 </option>
					<option value="10" <%if(att.getAttstate()==10){%>selected<%} %>> 事 假 </option>
					<option value="11" <%if(att.getAttstate()==11){%>selected<%} %>> 丧 假 </option>
					<option value="12" <%if(att.getAttstate()==12){%>selected<%} %>> 产 假 </option>
					<option value="13" <%if(att.getAttstate()==13){%>selected<%} %>> 陪产假 </option>
      			</select></td>
		    <td bgcolor="#FFFFFF" align="right" class="STYLE2 STYLE1">迟到分钟：</td>
		    <td bgcolor="#FFFFFF" class="STYLE2 STYLE1"><input name="late" type="text" title="填写迟到分钟！" value="<%=att.getAttlatetime() %>"></td>
		    <td bgcolor="#FFFFFF" align="right" class="STYLE2 STYLE1">早退分钟：</td>
		    <td bgcolor="#FFFFFF" class="STYLE2 STYLE1"><input name="early" type="text" title="填写早退分钟！" value="<%=att.getAttlatetime() %>"></td>
		  </tr>
		  <tr>
		    <td height="25" bgcolor="#FFFFFF" align="center" class="STYLE2 STYLE1">备&nbsp;&nbsp;注：</td>
		    <td colspan="5" bgcolor="#FFFFFF" class="STYLE2 STYLE1"><textarea name="desc" cols="50" rows="5" title="备注信息！" ><%if(att.getAttdesc()==null){%>无记录<%}else{ %><%=att.getAttdesc() %><%} %></textarea></td>
		    </tr>
		</table>
<!-- 内嵌Table end-->
	        </td>
	        <td width="9" background="<%=basePath %>attend/images/tab_16.gif">&nbsp;</td>
	      </tr>
	    </table></td>
	  </tr>
	  <tr>
	    <td height="29"><table width="100%" border="0" cellspacing="0" cellpadding="0">
	      <tr>
	        <td width="15" height="29"><img src="<%=basePath %>attend/images/tab_20.gif" width="15" height="29" /></td>
	        <td background="<%=basePath %>attend/images/tab_21.gif" align="center" class="STYLE2 STYLE1"><input name="submit" type="submit" value="提  交">&nbsp;&nbsp;<input name="reset" type="reset" value="重  置">&nbsp;&nbsp;</td>
	        <td width="14"><img src="<%=basePath %>attend/images/tab_22.gif" width="14" height="29" /></td>
	      </tr>
	    </table></td>
	  </tr>
	</table>
	</form>
	<!--内嵌代码 end-->
	</td>
    <td background="<%=basePath %>attend/frame/images/mail_rightbg.gif">&nbsp;</td>
  </tr>
  <tr>
    <td valign="bottom" background="/frame/images/mail_leftbg.gif"><img src="<%=basePath %>attend/frame/images/buttom_left2.gif" width="17" height="17" /></td>
    <td background="<%=basePath %>attend/frame/images/buttom_bgs.gif"><img src="<%=basePath %>attend/frame/images/buttom_bgs.gif" width="17" height="17" /></td>
    <td valign="bottom" background="/frame/images/mail_rightbg.gif"><img src="<%=basePath %>attend/frame/images/buttom_right2.gif" width="16" height="17" /></td>
  </tr>
</table>
  </body>
</html>
